package com.demo9;

/**
 * Created by Administrator on 2017/3/28.
 */
public class XianCheng2 extends Thread{//派生Thread类
    XianCheng2(){}
    XianCheng2(String szName){
        super(szName);
    }
    public void run(){
        for(int count=1,row=1; row<10;row++,count++){
            for(int i=0;i<count;i++){
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        XianCheng2 td=new XianCheng2();
        td.start();//调用start()方法
    }
}
